//
//  UIButton+IndexPath.m
//  SelfDriving
//
//  Created by dadahua on 17/6/9.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "UIButton+IndexPath.h"

@implementation UIButton (IndexPath)
static char *DHTableViewCellIndexPathKey = "DHTableViewCellIndexPathKey";

- (void)setIndexPath:(NSIndexPath *)indexPath {
    
    objc_setAssociatedObject(self, &DHTableViewCellIndexPathKey, indexPath, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSIndexPath *)indexPath {
    
    return objc_getAssociatedObject(self, &DHTableViewCellIndexPathKey);
}
@end
